package com.asuka.mapper;

import com.asuka.dto.TurnoverStatisticsDTO;
import com.asuka.entity.NewUser;
import com.asuka.entity.OrderReport;
import com.asuka.entity.OrderStatistics;
import com.asuka.entity.Top;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ReportMapper {


    List<OrderStatistics> turnoverStatistics(LocalDate begin, LocalDate end,Integer status);

    List<NewUser> newUser(LocalDate begin, LocalDate end);


    @Select("select count(*) from user where create_time < #{begin}")
    Integer selectSumByData(LocalDate begin);

    List<OrderReport> selectByTimeAndStatus(LocalDate begin, LocalDate end, Integer status);

    List<Top> selectTop(LocalDate begin, LocalDate end);
}
